interface PageQuery {
  pageNum: number;
  pageSize: number;
}

interface PageResult<T> {
  list: T;
  total: number;
}

export interface CouponQuery extends PageQuery {
  status?: number;
  keywords?: string;
}

export interface Coupon {
  id: string;
  name: string;
  code: string;
  platformLabel: string;
  typeLabel: string;
  faceValueLabel: string;
  validityPeriodLabel: string;
}

export type CouponPageResult = PageResult<Coupon[]>;

export interface CouponForm {
  id?: number;
  name: string;
  code: string;
  platform: number;
  type: number;
  faceValueType: number;
  faceValue: number;
  discount: number;
  circulation: number;
  minPoint: number;
  perLimit: number;
  validityPeriodType: number;
  validityDays: number;
  validityBeginTime: string;
  validityEndTime: string;
  applicationScope: number;
  spuCategoryIds: number[];
  spuIds: number[];
  remark: string;
}

export interface GoodsQuery extends PageQuery {
  name?: string;
  categoryId?: number;
}
export type GoodsPageResult = PageResult<Goods[]>;

export interface Goods {
  id: string;
  name: string;
  categoryId?: any;
  brandId?: any;
  originPrice: string;
  price: string;
  sales: number;
  picUrl?: any;
  album?: any;
  unit?: any;
  description: string;
  detail: string;
  status?: any;
  categoryName: string;
  brandName: string;
  skuList: Sku[];
}

export interface Sku {
  id: string;
  skuSn?: any;
  name: string;
  spuId?: any;
  specIds: string;
  price: string;
  stockNum: number;
  lockedStockNum?: any;
  picUrl?: any;
}
